<?php

namespace App\Models;

use App\Events\PlayerAddPollsEvent;
use App\Events\PlayerMinusPollsEvent;
use App\Models\Traits\BelongsToApplication;
use App\Models\Traits\BelongsToPlayer;
use App\Models\Traits\BelongsToUser;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Support extends Model
{
    use BelongsToApplication,
        BelongsToUser,
        BelongsToPlayer;

    protected $dispatchesEvents = [
        'created' => PlayerAddPollsEvent::class,
        'deleted' => PlayerMinusPollsEvent::class,
    ];

    public function gift(): BelongsTo
    {
        return $this->belongsTo(Gift::class);
    }
}
